package com.xinqi.modules.sys.dict.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.dict.domain.DictDataEntity;
import com.xinqi.modules.sys.dict.dto.req.DictDataCreateDTO;
import com.xinqi.modules.sys.dict.dto.req.DictDataUpdateDTO;
import com.xinqi.modules.sys.dict.dto.rsp.DictDataResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 字典数据表转换
 *
 * @author: linkai
 * @date: 2023/05/21
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class DictDataConvert {
    public abstract DictDataEntity create(DictDataCreateDTO s);

    public abstract DictDataEntity update(DictDataUpdateDTO s, @MappingTarget DictDataEntity t);

    public abstract DictDataEntity update(DictDataUpdateDTO s);

    public abstract DictDataResultDTO convert(DictDataEntity s);
}
